package com.cn.studySpring.pojo;

import org.aspectj.lang.ProceedingJoinPoint;

import java.io.PrintStream;

public class Minstrel {

	private PrintStream stream;
	
	public Minstrel(PrintStream stream) {
		this.stream = stream;
	}
	
	public void singBeforeQuest() {
		stream.println("fa la la,the kbight is so brave");
	}
	
	public void singAfterQuest() {
		stream.println("探险之后");
	}
	
	
	public void doAfterThrowing(Exception e) {
		System.out.println("例外通知");
		System.out.println(e.getMessage());
	}

	
	public Object  doAround(ProceedingJoinPoint pjp) throws Throwable {
		System.out.println("进入方法---环绕通知");
		Object o = pjp.proceed();
		System.out.println("退出方法---环绕通知");
		return o;
	}
}
 